package com.gzu.shop.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gzu.shop.dto.CategoryDTO;
import com.gzu.shop.entity.Thing;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gzu.shop.entity.ThingSimilarity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author luo'jin'biao
 * @description 针对表【t_thing(商品表)】的数据库操作Mapper
 * @createDate 2024-06-25 00:23:13
 * @Entity com.gzu.shop.entity.Thing
 */
@Mapper
public interface ThingMapper extends BaseMapper<Thing> {
    List<Thing> selectAll();

    void insertSimilarity(Long thing1Id, Long thing2Id, double thingSimilarity);

    /**
     * 实现动态SQL
     *
     * @param categoryDTO
     * @return
     */

    IPage<Thing> getThingsByCategory(Page<?> page,  @Param("categoryDTO") CategoryDTO categoryDTO);
}




